/*******************************************************************
 * author   :  Charlies-ls
 * Date     :  2021-09-26
 * Function :  stack base on list
 * Copyright (c) 2021. artestplay@outlook.com. All Rights Reserved.
 *******************************************************************/

#ifndef AX_STACK_H
#define AX_STACK_H
#include "ax_list.h"

#ifdef __cplusplus
extern "C"
{
#endif

typedef struct
{
    ax_list* l;
}ax_stack;

ax_stack*ax_stack_create();
void     ax_stack_destory(ax_stack* fifo);

void     ax_stack_push  (ax_stack* fifo, void* data);
void*    ax_stack_pop   (ax_stack* fifo);
void*    ax_stack_bottom(ax_stack* fifo);
void*    ax_stack_top   (ax_stack* fifo);


#ifdef __cplusplus
}
#endif
#endif // AX_STACK_H
